
</div>

</div>

</div>
<!-- end: Content -->
<br><br><br>
</div><!--/container-->



<script language='javascript'>
    require(['bootstrap'], function ($) {
        $('[data-toggle="tooltip"]').tooltip("destroy").tooltip({
            container: $(document.body)
        });
        $('[data-toggle="popover"]').popover("destroy").popover({
            container: $(document.body)
        });
    });
</script>
<script language="javascript">
    /*myrequire(['web/init']);*/
    if( $('form.form-validate').length<=0){
        window.formInited = true;
    }
    window.formInitTimer = setInterval(function () {
        if (typeof(window.formInited ) !== 'undefined') {
            $('#page-loading').remove();
            clearInterval(window.formInitTimer);
        }else{
            //$('#page-loading').show();
        }
    }, 1);
</script>

<!-- start: JavaScript-->

<script type="text/javascript">
    $("#n_second").hide();

    $("#n_index").click(function() {
        $(".main_modle_index").removeClass('main_modle_index_nullactive');
        $(".main_modle_second").removeClass('main_modle_second_nullactive');

        $(".main_modle_index").addClass('main_modle_index_active');
        $(".main_modle_second").addClass('main_modle_second_active');
        setTimeout(function(){
            $("#n_second").show();
        }, 280)

        $(this).hide();
    });
    $("#n_second").click(function() {
        $(".main_modle_index").removeClass('main_modle_index_active');
        $(".main_modle_second").removeClass('main_modle_second_active');
        $(".main_modle_index").addClass('main_modle_index_nullactive');
        $(".main_modle_second").addClass('main_modle_second_nullactive');
        $("#n_index").show();
        $(this).hide();
    });
    var canshu=1;

    /*$(".sidebar_backimg").click(function() {
        $("#suoxiao1").toggle();
        $("#suoxiao2").toggle();
        if(canshu==1){
            canshu=2
            $(".navbar").addClass('navbar_active');
            $(".main").addClass('main_active');
            $(".sidebar").addClass('sidebar_active');
            $(".sidebar_modle_title").hide();
            $(".sidebar_modle_hover").show();
        }else{
            canshu=1
            $(".navbar").removeClass('navbar_active');
            $(".main").removeClass('main_active');
            $(".sidebar").removeClass('sidebar_active');
            $(".sidebar_modle_title").show();
            $(".sidebar_modle_hover").hide();
        }

    });*/

   //  window.jQuery || document.write("<script src='assets/js/jquery-2.1.1.min.js'>"+"<"+"/script>");
</script>
<!--<![endif]-->
<!--[if IE]>
<script type="text/javascript">
    window.jQuery || document.write("<script src='{php echo MODEL_LOCAL}static/bootstrap/js/jquery-1.11.1.min.js'>"+"<"+"/script>");
</script>
<![endif]-->

<script src="{php echo MODEL_LOCAL}static/bootstrap/js/jquery-migrate-1.2.1.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{php echo MODEL_LOCAL}static/js/bootoast.js"></script>

<!-- page scripts -->
<!-- 没发现能用到，可以打开注释<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/jquery-ui/js/jquery-ui-1.10.4.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/touchpunch/jquery.ui.touch-punch.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/moment/moment.min.js"></script>-->
<!--不可开注释，选择日期和颜色选项卡有冲突<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/fullcalendar/js/fullcalendar.min.js"></script>-->
<!--[if lte IE 8]>
<script language="javascript" type="text/javascript" src="{php echo MODEL_LOCAL}static/bootstrap/plugins/excanvas/excanvas.min.js"></script>
<![endif]-->
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/flot/jquery.flot.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/flot/jquery.flot.pie.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/flot/jquery.flot.stack.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/flot/jquery.flot.resize.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/flot/jquery.flot.time.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/flot/jquery.flot.spline.min.js"></script>
<!-- 不可删注释，颜色卡有冲突<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/xcharts/js/xcharts.min.js"></script>-->
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/autosize/jquery.autosize.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/placeholder/jquery.placeholder.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/datatables/js/jquery.dataTables.min.js"></script>
<!--  报错<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/datatables/js/dataTables.bootstrap.min.js"></script>-->
<!--不可删注释，颜色卡有冲突<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/raphael/raphael.min.js"></script>-->
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/morris/js/morris.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/jvectormap/js/jquery-jvectormap-1.2.2.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/jvectormap/js/jquery-jvectormap-world-mill-en.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/jvectormap/js/gdp-data.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/gauge/gauge.min.js"></script>
<!-- theme scripts -->
<script src="{php echo MODEL_LOCAL}static/bootstrap/js/SmoothScroll.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/js/jquery.mmenu.min.js"></script>
<!--不可删注释，颜色卡有冲突<script src="{php echo MODEL_LOCAL}static/bootstrap/js/core.min.js"></script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/plugins/d3/d3.min.js"></script>-->
<!-- inline scripts related to this page -->

<!-- end: JavaScript-->
<script>
    $(function () {
        $('form').on('submit', function (e) {
			if($(this).attr('form-jump')!=1)
			{
				e.preventDefault();
				getSubmit(e.target, function (res) {
					console.log(res)
				})
			}
			else
			{
				e.preventDefault();
				var url = $(this).attr('action');
            	var data = $(this).serialize();
				window.location.href = url+'&'+data;
			}
        });
		$('.btn-ajax').click(function (e) {
		    e.preventDefault();
			var title = $(this).attr('title');
			//有title属性时弹出确认层
			if(title !='')
			{
				if(confirm(title))
				{
					getajsx(e.target, function (res) {
						console.log(res)
					})
				}
			}
			else
			{
				getajsx(e.target, function (res) {
					console.log(res)
				})
			}
			
        });
		$('.label').click(function (e) {
		    e.preventDefault();
			getlabel(e.target, function (res) {
				console.log(res)
			})
			
        });
    })
    function getSubmit(elm, callback) {
        $.ajax({
            url: $(elm).attr('action'),
            data: $(elm).serialize(),
			type : $(elm).attr('method'),
            // success: callback
            success: function (res) {
				var res = $.parseJSON(res);
				bootoast({
                    message: res.msg,
                    type: res.state,
                    position:'top',
                    timeout:2
                });
				//跳转类型
				if(res.type ==1)
				{
					setTimeout(function () {
						window.location.href = res.url;
					}, 2000)
				}
				else if(res.type ==2)
				{
					setTimeout(function () {
                    	location.reload();
                	}, 2000)
				}
				else if(res.type ==3)
				{
					setTimeout(function () {
                    	window.history.back(-1);
                	}, 2000)
				}
                
            },
            fail: function (res) {
                console.log(res)
            }
        })
	}
	function getajsx(elm, callback) {
        $.ajax({
            url: $(elm).attr('data-ajax'),
            data: '',
			type : 'post',
            // success: callback
            success: function (res) {
				var res = $.parseJSON(res);
				bootoast({
                    message: res.msg,
                    type: res.state,
                    position:'top',
                    timeout:2
                });
				//跳转类型
				if(res.type ==1)
				{
					setTimeout(function () {
						window.location.href = res.url;
					}, 2000)
				}
				else if(res.type ==2)
				{
					setTimeout(function () {
                    	location.reload();
                	}, 2000)
				}
				else if(res.type ==3)
				{
					setTimeout(function () {
                    	window.history.back(-1);
                	}, 2000)
				}
                
            },
            fail: function (res) {
                console.log(res)
            }
        });
    }
	function getlabel(elm, callback) {
		var dmsg = $(elm).html();
		var lmsg = $(elm).attr('list-html');
		$(elm).html('<img src="{php echo MODEL_LOCAL}static/images/jiazai.gif" height="15px">');
		var dclass = $(elm).attr('class');
		var lclass = $(elm).attr('list-class');
		$.ajax({
            url: $(elm).attr('data-ajax'),
            data: '',
			type : 'post',
            // success: callback
            success: function (res) {
				var res = $.parseJSON(res);
				if(res.state == 'danger')
				{
					$(elm).html(dmsg);
					bootoast({
						message: res.msg,
						type: res.state,
						position:'top',
						timeout:2
					});
				}
				else
				{
					//修改文字
					$(elm).html(lmsg);
					$(elm).attr('list-html',dmsg);
					//修改背景
					$(elm).attr('class',lclass);
					$(elm).attr('list-class',dclass);
				}
			}
        });
    }
</script>
<script src="{php echo MODEL_LOCAL}static/bootstrap/js/pages/index.js"></script>
</body>
</html>